<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CopyMemoryString</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CopyMemoryString()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#006666"><b>CopyMemoryString</b></font>(*String [, @*DestinationMemoryID])</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Copy the string from the specified address to the destination memory address if specified, 
or at the end of the previous buffer if omitted. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>*String</i></td>
<td width="90%"> 
 
The address of the string to copy. The string must be terminated with a null-character. 
The string is expected to be in the PB string format. 

 

</td></tr>
<tr><td><i>@*DestinationMemoryID (optional)</i></td>
<td> 
 
The pointer to a variable holding the address with the destination buffer. After the string 
has been copied, the variable *DestinationMemoryID will point to the null-character at the end of the 
copied string, so a further call to this function will append the new string to the previous one. 
<br>
<br>
If this parameter is omitted, the address from the previous call is used. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns the value of *DestinationMemoryID after the string was copied. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  *Buffer =<font color="#006666"> AllocateMemory</font>(1000)
  *Pointer = *Buffer
<font color="#006666">  CopyMemoryString</font>("Hello", @*Pointer)
<font color="#006666">  CopyMemoryString</font>(" World")  <font color="#006666">; This one will be put just after "Hello"</font>
  *Pointer-2                  <font color="#006666">; Come back from 2 characters (on the 'l' of 'World')</font>
<font color="#006666">  CopyMemoryString</font>("LD")      <font color="#006666">; Finally the last two letters will be uppercase</font>
  <b><font color="#006666">Debug</font></b> <font color="#006666">PeekS</font>(*Buffer)
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="copymemory.html">CopyMemory()</a>, <a href="peeks.html">PeekS()</a>, <a href="pokes.html">PokeS()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=copymemory.html>CopyMemory()</a> - <a href=index.html>Memory Index</a> - <a href=fillmemory.html>FillMemory()</a> -&gt;



</body></html>